<?PHP
/*
 * $Id: MapUtilsTest.class.php 49 2009-05-16 02:20:14Z namba@craid.co.jp $
 * =============================================================================
 * Barge - Web application framework on PHP5 
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * =============================================================================
 * For more information, see http://barge.googlecode.com/
 */
namespace barge\utils;

use \Exception;
use \UnitTestCase;

use barge\utils\HashMap;
use barge\utils\MapUtils;

/**
 * @see UnitTestCase
 */
class MapUtilsTest extends UnitTestCase 
{
	
	/**
	 * @test
	 */
	public function testCombine() 
	{
		$map1 = new HashMap(array('a' => 'd', 'b' => 'e', 'c' => 'f'));
		$map2 = new HashMap(array('g' => 'x', 'h' => 'y', 'i' => 'z'));
		$combineMap = MapUtils::combine($map1, $map2);
//var_dump($combineMap);
		$this->assertIdentical(true, $combineMap->contains('d'));
		$this->assertIdentical('x', $combineMap->get('d'));
		$this->assertIdentical(true, $combineMap->contains('e'));
		$this->assertIdentical('y', $combineMap->get('e'));
		$this->assertIdentical(true, $combineMap->contains('f'));
		$this->assertIdentical('z', $combineMap->get('f'));
	}
	

}

?>